<!-- HTML header for doxygen 1.9.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>COMMONS-NET: commonsNet.tftp.TFTPAckPacket类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">COMMONS-NET
   </div>
  </td>
    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classcommonsNet_1_1tftp_1_1TFTPAckPacket.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="classcommonsNet_1_1tftp_1_1TFTPAckPacket-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">commonsNet.tftp.TFTPAckPacket类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>TFTPAckPacket 是从 TFTPPacket 派生的类，定义了 TFTP 确认数据包类型。  
 <a href="classcommonsNet_1_1tftp_1_1TFTPAckPacket.html#details">更多...</a></p>
<div class="dynheader">
类 commonsNet.tftp.TFTPAckPacket 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classcommonsNet_1_1tftp_1_1TFTPAckPacket.png" usemap="#commonsNet.tftp.TFTPAckPacket_map" alt=""/>
  <map id="commonsNet.tftp.TFTPAckPacket_map" name="commonsNet.tftp.TFTPAckPacket_map">
<area href="classcommonsNet_1_1tftp_1_1TFTPPacket.html" title="TFTPPacket 是一个抽象类，封装了五种类型的 TFTP 数据包共有的功能。它还提供了一个静态工厂方法，用于根据数据报创建正确的 TFTP 数据包实例。" alt="commonsNet.tftp.TFTPPacket" shape="rect" coords="0,0,198,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a0d800e7375781bf1e4b9422f62f63fb5"><td class="memItemLeft" align="right" valign="top">public&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPAckPacket.html#a0d800e7375781bf1e4b9422f62f63fb5">init</a> (data: Array&lt;Byte&gt;, address: IPSocketAddress)</td></tr>
<tr class="memdesc:a0d800e7375781bf1e4b9422f62f63fb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">根据接收到的数据报文创建一个 TFTPAckPacket 对象。  <br /></td></tr>
<tr class="separator:a0d800e7375781bf1e4b9422f62f63fb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60f677ba8b92ab85e9d1938a42475d25"><td class="memItemLeft" align="right" valign="top">public&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPAckPacket.html#a60f677ba8b92ab85e9d1938a42475d25">init</a> (destination: String, port: UInt16, blockNumber: Int32)</td></tr>
<tr class="memdesc:a60f677ba8b92ab85e9d1938a42475d25"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个 TFTPAckPacket 对象，用于向指定端口的主机发送确认接收到的数据块。  <br /></td></tr>
<tr class="separator:a60f677ba8b92ab85e9d1938a42475d25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade06afb0b85cf5f9fa79a0de6f1d9daa"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPAckPacket.html#ade06afb0b85cf5f9fa79a0de6f1d9daa">getBlockNumber</a> (): Int32</td></tr>
<tr class="memdesc:ade06afb0b85cf5f9fa79a0de6f1d9daa"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取 ACK 包中的块编号。  <br /></td></tr>
<tr class="separator:ade06afb0b85cf5f9fa79a0de6f1d9daa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62131e28e0eb3a606cbdbf7fa2356315"><td class="memItemLeft" align="right" valign="top">public override func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPAckPacket.html#a62131e28e0eb3a606cbdbf7fa2356315">newData</a> (): Array&lt;Byte&gt;</td></tr>
<tr class="memdesc:a62131e28e0eb3a606cbdbf7fa2356315"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个包含 TFTP 确认数据包所有数据的 UDP 数据报文，按照正确的格式组织。  <br /></td></tr>
<tr class="separator:a62131e28e0eb3a606cbdbf7fa2356315"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b2398720545c4791323ed2216eff2d6"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPAckPacket.html#a2b2398720545c4791323ed2216eff2d6">setBlockNumber</a> (blockNumber: Int32): Unit</td></tr>
<tr class="memdesc:a2b2398720545c4791323ed2216eff2d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置 ACK 包中所确认的数据块编号  <br /></td></tr>
<tr class="separator:a2b2398720545c4791323ed2216eff2d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2ad2cb6df9d7256af9ccf01cf6ce449"><td class="memItemLeft" align="right" valign="top">public override func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPAckPacket.html#ae2ad2cb6df9d7256af9ccf01cf6ce449">toString</a> (): String</td></tr>
<tr class="memdesc:ae2ad2cb6df9d7256af9ccf01cf6ce449"><td class="mdescLeft">&#160;</td><td class="mdescRight">用于调试，返回对象的字符串表示，包括类型和块编号。  <br /></td></tr>
<tr class="separator:ae2ad2cb6df9d7256af9ccf01cf6ce449"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html">commonsNet.tftp.TFTPPacket</a></td></tr>
<tr class="memitem:a449be75d783028d271f3e1af62f970a9 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public static func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a449be75d783028d271f3e1af62f970a9">newTFTPPacket</a> (datagram: Array&lt;Byte&gt;, address: String, port: UInt16): <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html">TFTPPacket</a></td></tr>
<tr class="memdesc:a449be75d783028d271f3e1af62f970a9 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">当接收到一个预期为 TFTP 数据包的数据报时，使用此工厂方法创建正确的 TFTPPacket 对象，封装在该数据报中的数据。  <br /></td></tr>
<tr class="separator:a449be75d783028d271f3e1af62f970a9 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af865694cdd78af54d3d0775a887cf5ed inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#af865694cdd78af54d3d0775a887cf5ed">getAddress</a> (): String</td></tr>
<tr class="memdesc:af865694cdd78af54d3d0775a887cf5ed inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取数据包的来源或将要发送的目标主机地址。  <br /></td></tr>
<tr class="separator:af865694cdd78af54d3d0775a887cf5ed inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27e7a619dfec5ab08d65079a57c58657 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a27e7a619dfec5ab08d65079a57c58657">getPort</a> (): UInt16</td></tr>
<tr class="memdesc:a27e7a619dfec5ab08d65079a57c58657 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取数据包的来源或将要发送的目标端口。  <br /></td></tr>
<tr class="separator:a27e7a619dfec5ab08d65079a57c58657 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ac725cc37ddee6a29e93c6d16205f73 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a0ac725cc37ddee6a29e93c6d16205f73">getPacketType</a> (): Int64</td></tr>
<tr class="memdesc:a0ac725cc37ddee6a29e93c6d16205f73 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回数据包的类型。  <br /></td></tr>
<tr class="separator:a0ac725cc37ddee6a29e93c6d16205f73 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e78b2bfd31eec2d9b33ead235374370 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a5e78b2bfd31eec2d9b33ead235374370">newData</a> (): Array&lt;Byte&gt;</td></tr>
<tr class="memdesc:a5e78b2bfd31eec2d9b33ead235374370 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个正确格式的 TFTP 数据包数据。  <br /></td></tr>
<tr class="separator:a5e78b2bfd31eec2d9b33ead235374370 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a027e8d3541a9ff74cf75639a1251d092 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a027e8d3541a9ff74cf75639a1251d092">setAddress</a> (address: String): Unit</td></tr>
<tr class="memdesc:a027e8d3541a9ff74cf75639a1251d092 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置数据包要发送到的主机地址。  <br /></td></tr>
<tr class="separator:a027e8d3541a9ff74cf75639a1251d092 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab907b12cf65da8783e9dfb81ea18e5c4 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#ab907b12cf65da8783e9dfb81ea18e5c4">setPort</a> (port: UInt16): Unit</td></tr>
<tr class="memdesc:ab907b12cf65da8783e9dfb81ea18e5c4 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置数据包要发送的端口。  <br /></td></tr>
<tr class="separator:ab907b12cf65da8783e9dfb81ea18e5c4 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4aad5bc8e980f2256d2bbe3baa9d746b inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public open func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a4aad5bc8e980f2256d2bbe3baa9d746b">toString</a> (): String</td></tr>
<tr class="memdesc:a4aad5bc8e980f2256d2bbe3baa9d746b inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">用于调试，返回对象的字符串表示，包括地址、端口、类型。  <br /></td></tr>
<tr class="separator:a4aad5bc8e980f2256d2bbe3baa9d746b inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a9680e5cf94e393bd4582620bb483beaa"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPAckPacket.html#a9680e5cf94e393bd4582620bb483beaa">var blockNumber</a> : Int32 = 0;</td></tr>
<tr class="memdesc:a9680e5cf94e393bd4582620bb483beaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">ACK 包中的块编号  <br /></td></tr>
<tr class="separator:a9680e5cf94e393bd4582620bb483beaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
额外继承的成员函数</h2></td></tr>
<tr class="inherit_header pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket')"><img src="closed.png" alt="-"/>&#160;Public 属性 继承自 <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html">commonsNet.tftp.TFTPPacket</a></td></tr>
<tr class="memitem:a1b9d01dc44fc4d498b613e4c8f0b606d inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a1b9d01dc44fc4d498b613e4c8f0b606d">static let READ_REQUEST</a> = 1;</td></tr>
<tr class="memdesc:a1b9d01dc44fc4d498b613e4c8f0b606d inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于1。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示读请求数据包。  <br /></td></tr>
<tr class="separator:a1b9d01dc44fc4d498b613e4c8f0b606d inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae400dc7ae167e2886890feefe6b9385e inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#ae400dc7ae167e2886890feefe6b9385e">static let WRITE_REQUEST</a> = 2;</td></tr>
<tr class="memdesc:ae400dc7ae167e2886890feefe6b9385e inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于2。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示写请求数据包。  <br /></td></tr>
<tr class="separator:ae400dc7ae167e2886890feefe6b9385e inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f98d56c20097453a986157c881bf5ea inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a8f98d56c20097453a986157c881bf5ea">static let DATA</a> = 3;</td></tr>
<tr class="memdesc:a8f98d56c20097453a986157c881bf5ea inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于3。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示数据数据包。  <br /></td></tr>
<tr class="separator:a8f98d56c20097453a986157c881bf5ea inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef344f92fab5c92ba4cc7794804bbbc0 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#aef344f92fab5c92ba4cc7794804bbbc0">static let ACKNOWLEDGEMENT</a> = 4;</td></tr>
<tr class="memdesc:aef344f92fab5c92ba4cc7794804bbbc0 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于4。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示确认数据包。  <br /></td></tr>
<tr class="separator:aef344f92fab5c92ba4cc7794804bbbc0 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa636305b5ea4afa869b03bdad53fa2e9 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#aa636305b5ea4afa869b03bdad53fa2e9">static let ERROR</a> = 5;</td></tr>
<tr class="memdesc:aa636305b5ea4afa869b03bdad53fa2e9 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于5。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示错误数据包。  <br /></td></tr>
<tr class="separator:aa636305b5ea4afa869b03bdad53fa2e9 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae23de23646555553bcebb5a748af38c5 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#ae23de23646555553bcebb5a748af38c5">static let SEGMENT_SIZE</a> = 512;</td></tr>
<tr class="memdesc:ae23de23646555553bcebb5a748af38c5 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 数据包的最大段大小，为 512 字节。  <br /></td></tr>
<tr class="separator:ae23de23646555553bcebb5a748af38c5 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td colspan="2" onclick="javascript:toggleInherit('pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket')"><img src="closed.png" alt="-"/>&#160;包函数 继承自 <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html">commonsNet.tftp.TFTPPacket</a></td></tr>
<tr class="memitem:ad3f5a4b401a490faa07781b1565a6b74 inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#ad3f5a4b401a490faa07781b1565a6b74">init</a> (packettype: Int64, address: String, port: UInt16)</td></tr>
<tr class="memdesc:ad3f5a4b401a490faa07781b1565a6b74 inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个 TFTPPacket 对象。  <br /></td></tr>
<tr class="separator:ad3f5a4b401a490faa07781b1565a6b74 inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>TFTPAckPacket 是从 TFTPPacket 派生的类，定义了 TFTP 确认数据包类型。 </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a0d800e7375781bf1e4b9422f62f63fb5" name="a0d800e7375781bf1e4b9422f62f63fb5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d800e7375781bf1e4b9422f62f63fb5">&#9670;&#160;</a></span>init() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public commonsNet.tftp.TFTPAckPacket.init </td>
          <td>(</td>
          <td class="paramname"><em>data</em>:&#160;</td>
          <td class="paramtype">Array&lt;Byte&gt;, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>address</em>:&#160;</td>
          <td class="paramtype">IPSocketAddress&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>根据接收到的数据报文创建一个 TFTPAckPacket 对象。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>接收到的确认信息的数据报文 @para address 数据报文来源的远程地址 </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">TFTPPacketException</td><td>如果数据报文不是有效的TFTP确认数据包 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a60f677ba8b92ab85e9d1938a42475d25" name="a60f677ba8b92ab85e9d1938a42475d25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60f677ba8b92ab85e9d1938a42475d25">&#9670;&#160;</a></span>init() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public commonsNet.tftp.TFTPAckPacket.init </td>
          <td>(</td>
          <td class="paramname"><em>destination</em>:&#160;</td>
          <td class="paramtype">String, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>port</em>:&#160;</td>
          <td class="paramtype">UInt16, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>blockNumber</em>:&#160;</td>
          <td class="paramtype">Int32&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>创建一个 TFTPAckPacket 对象，用于向指定端口的主机发送确认接收到的数据块。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">destination</td><td>要发送数据包的目标主机 </td></tr>
    <tr><td class="paramname">port</td><td>发送数据包的目标端口 </td></tr>
    <tr><td class="paramname">blockNumber</td><td>被确认的数据块编号 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="ade06afb0b85cf5f9fa79a0de6f1d9daa" name="ade06afb0b85cf5f9fa79a0de6f1d9daa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade06afb0b85cf5f9fa79a0de6f1d9daa">&#9670;&#160;</a></span>getBlockNumber()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.tftp.TFTPAckPacket.getBlockNumber </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Int32 </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取 ACK 包中的块编号。 </p>
<dl class="section return"><dt>返回</dt><dd>ACK 包中的块编号 </dd></dl>

</div>
</div>
<a id="a62131e28e0eb3a606cbdbf7fa2356315" name="a62131e28e0eb3a606cbdbf7fa2356315"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62131e28e0eb3a606cbdbf7fa2356315">&#9670;&#160;</a></span>newData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public override func commonsNet.tftp.TFTPAckPacket.newData </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Array&lt;Byte&gt; </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>创建一个包含 TFTP 确认数据包所有数据的 UDP 数据报文，按照正确的格式组织。 </p>
<dl class="section return"><dt>返回</dt><dd>包含 TFTP 确认数据包的 UDP 数据报文 </dd></dl>

</div>
</div>
<a id="a2b2398720545c4791323ed2216eff2d6" name="a2b2398720545c4791323ed2216eff2d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b2398720545c4791323ed2216eff2d6">&#9670;&#160;</a></span>setBlockNumber()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.tftp.TFTPAckPacket.setBlockNumber </td>
          <td>(</td>
          <td class="paramname"><em>blockNumber</em>:&#160;</td>
          <td class="paramtype">Int32</td><td>)</td>
          <td>: Unit </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置 ACK 包中所确认的数据块编号 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">blockNumber</td><td>设置的块编号 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae2ad2cb6df9d7256af9ccf01cf6ce449" name="ae2ad2cb6df9d7256af9ccf01cf6ce449"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2ad2cb6df9d7256af9ccf01cf6ce449">&#9670;&#160;</a></span>toString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public override func commonsNet.tftp.TFTPAckPacket.toString </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: String </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>用于调试，返回对象的字符串表示，包括类型和块编号。 </p>
<dl class="section return"><dt>返回</dt><dd>返回表示对象的字符串 </dd></dl>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="a9680e5cf94e393bd4582620bb483beaa" name="a9680e5cf94e393bd4582620bb483beaa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9680e5cf94e393bd4582620bb483beaa">&#9670;&#160;</a></span>var blockNumber</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.tftp.TFTPAckPacket.var blockNumber : Int32 = 0;</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>ACK 包中的块编号 </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>src/tftp/<a class="el" href="tftp__ack__packet_8cj.html">tftp_ack_packet.cj</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.9.6-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacecommonsNet.html">commonsNet</a></li><li class="navelem"><a class="el" href="namespacecommonsNet_1_1tftp.html">tftp</a></li><li class="navelem"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPAckPacket.html">TFTPAckPacket</a></li>
    <li class="footer">制作者 <img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
  </ul>
</div>
</body>
</html>
